<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::group(['middleware' => ['web']], function () {

    Route::get('menu',['as' => 'Home.Page.menu', 'uses' => 'HomeController@menu']);
    Route::get('content',['as' => 'Home.Page.content', 'uses' => 'HomeController@content']);
    Route::get('qrcode',['as' => 'Home.Page.qrcode', 'uses' => 'HomeController@qrcode']);

    Route::group(['prefix'=>'admin'],function(){
        Route::get('login',['as' => 'Admin.Home.login', 'uses' => 'AdminController@login']);
        Route::get('user-list',['as' => 'Admin.Home.userList', 'uses' => 'AdminController@userList']);
        Route::get('banner-list',['as' => 'Admin.Home.bannerList', 'uses' => 'AdminController@bannerList']);
        Route::get('banner-set',['as' => 'Admin.Home.bannerSet', 'uses' => 'AdminController@bannerSet']);
        Route::get('banner-nav-list',['as' => 'Admin.Home.bannerNavList', 'uses' => 'AdminController@bannerNavList']);
        Route::get('banner-nav-set',['as' => 'Admin.Home.bannerNavSet', 'uses' => 'AdminController@bannerNavSet']);
        Route::get('advert-img-list',['as' => 'Admin.Home.advertImgList', 'uses' => 'AdminController@advertImgList']);
        Route::get('advert-img-set',['as' => 'Admin.Home.advertImgSet', 'uses' => 'AdminController@advertImgSet']);
        Route::get('change-Pwd',['as' => 'Admin.Home.changePwd', 'uses' => 'AdminController@changePwd']);
        Route::get('admin-list',['as' => 'Admin.Home.adminList' , 'uses' => 'AdminController@adminList']);
        Route::get('admin-set',['as' => 'Admin.Home.adminSet' , 'uses' => 'AdminController@adminSet']);
        Route::get('classify-list',['as' => 'Admin.Home.classifyList' , 'uses' => 'AdminController@classifyList']);
        Route::get('goods-list',['as' => 'Admin.Home.goodsList' , 'uses' => 'AdminController@goodsList']);
        Route::get('goods-banner-list',['as' => 'Admin.Home.goodsBannerList' , 'uses' => 'AdminController@goodsBannerList']);
        Route::get('goods-img-list',['as' => 'Admin.Home.goodsImgList' , 'uses' => 'AdminController@goodsImgList']);
        Route::get('goods-set',['as' => 'Admin.Home.goodsSet' , 'uses' => 'AdminController@goodsSet']);
        Route::get('orders-list',['as' => 'Admin.Home.ordersList' , 'uses' => 'AdminController@ordersList']);
        Route::get('orders-details-list',['as' => 'Admin.Home.ordersDetails' , 'uses' => 'AdminController@ordersDetails']);
        Route::get('write-ship-info-list',['as' => 'Admin.Home.writeShipInfo' , 'uses' => 'AdminController@writeShipInfo']);
        Route::get('goods-comment-list',['as' => 'Admin.Home.goodsCommentList' , 'uses' => 'AdminController@goodsCommentList']);
        Route::get('goods-comment-img-list',['as' => 'Admin.Home.goodsCommentImgList' , 'uses' => 'AdminController@goodsCommentImgList']);
        Route::get('coupons-list',['as' => 'Admin.Home.couponsList' , 'uses' => 'AdminController@couponsList']);
        Route::get('coupons-set',['as' => 'Admin.Home.couponsSet' , 'uses' => 'AdminController@couponsSet']);
        Route::get('goods-integral-list',['as' => 'Admin.Home.goodsIntegralList' , 'uses' => 'AdminController@goodsIntegralList']);
        Route::get('goods-integral-set',['as' => 'Admin.Home.goodsIntegralSet' , 'uses' => 'AdminController@goodsIntegralSet']);
        Route::get('express-company-list',['as' => 'Admin.Home.expressCompanyList' , 'uses' => 'AdminController@expressCompanyList']);
        Route::get('goods-spu-list',['as' => 'Admin.Home.goodsSpuList' , 'uses' => 'AdminController@goodsSpuList']);
        Route::get('goods-spu-set',['as' => 'Admin.Home.goodsSpuSet' , 'uses' => 'AdminController@goodsSpuSet']);
        Route::get('user-integral-list',['as' => 'Admin.Home.userIntegralList' , 'uses' => 'AdminController@userIntegralList']);
        Route::get('qrcode-list',['as' => 'Admin.Home.qrCodeList' , 'uses' => 'AdminController@qrCodeList']);
        Route::get('qrcode-set',['as' => 'Admin.Home.qrCodSet' , 'uses' => 'AdminController@qrCodSet']);
        Route::get('game-rank',['as' => 'Admin.Home.gameRank' , 'uses' => 'AdminController@gameRank']);
        Route::get('bargain-list',['as' => 'Admin.Home.bargainList' , 'uses' => 'AdminController@bargainList']);
        Route::get('bargain-set',['as' => 'Admin.Home.bargainSet' , 'uses' => 'AdminController@bargainSet']);
        Route::get('user-bargain-initiate-list',['as' => 'Admin.Home.userBargainInitiateList' , 'uses' => 'AdminController@userBargainInitiateList']);
        Route::get('user-bargain-initiate-detail',['as' => 'Admin.Home.userBargainInitiateDetail' , 'uses' => 'AdminController@userBargainInitiateDetail']);
        Route::get('user-bargain-join-list',['as' => 'Admin.Home.userBargainJoinList' , 'uses' => 'AdminController@userBargainJoinList']);
        Route::get('group-list',['as' => 'Admin.Home.groupList' , 'uses' => 'AdminController@groupList']);
        Route::get('group-set',['as' => 'Admin.Home.groupSet' , 'uses' => 'AdminController@groupSet']);
        Route::get('group-add-list',['as' => 'Admin.Home.groupAddList' , 'uses' => 'AdminController@groupAddList']);
        Route::get('group-add-member-list',['as' => 'Admin.Home.groupAddMemberList' , 'uses' => 'AdminController@groupAddMemberList']);
        Route::get('group-add-detail',['as' => 'Admin.Home.groupAddDetail' , 'uses' => 'AdminController@groupAddDetail']);
        Route::get('group-add-member-detail',['as' => 'Admin.Home.groupAddMemberDetail' , 'uses' => 'AdminController@groupAddMemberDetail']);
        Route::get('group-goods-spu-list',['as' => 'Admin.Home.groupGoodsSpuList' , 'uses' => 'AdminController@groupGoodsSpuList']);
        Route::get('group-goods-spu-set',['as' => 'Admin.Home.groupGoodsSpuSet' , 'uses' => 'AdminController@groupGoodsSpuSet']);


    });

    Route::group(['prefix'=>'api', 'namespace'=>'Api','middleware' => ['cors']],function(){
        Route::group(['prefix' => 'admin','namespace'=>'Admin'],function(){
            Route::post('auth/sign-in',['as'=>'Api.Admin.Auth.signInAdmin','uses'=>'AuthController@signInAdmin']);
            Route::post('auth/change-pwd',['as'=>'Api.Admin.Auth.changePassword','uses'=>'AuthController@changePassword']);
            Route::get('auth/signOut',['as'=>'Api.Admin.Auth.signOut','uses'=>'AuthController@signOut']);
            Route::post('sys/setBanner',['as'=>'Api.Admin.sys.setBanner','uses'=>'SystemController@setBanner']);
            Route::post('sys/setBannerNav',['as'=>'Api.Admin.sys.setBannerNav','uses'=>'SystemController@setBannerNav']);
            Route::post('sys/delBanner',['as'=>'Api.Admin.sys.delBanner','uses'=>'SystemController@delBanner']);
            Route::post('sys/delBannerNav',['as'=>'Api.Admin.sys.delBannerNav','uses'=>'SystemController@delBannerNav']);
            Route::post('sys/setAdvertImg',['as'=>'Api.Admin.sys.setAdvertImg','uses'=>'SystemController@setAdvertImg']);
            Route::post('sys/delAdvertImg',['as'=>'Api.Admin.sys.delAdvertImg','uses'=>'SystemController@delAdvertImg']);
            Route::post('sys/setAdmin',['as' => 'Api.Admin.sys.setAdmin','uses' => 'SystemController@setAdmin']);
            Route::post('sys/delAdmin',['as'=>'Api.Admin.sys.delAdmin','uses'=>'SystemController@delAdmin']);
            Route::post('sys/addClassify',['as'=>'Api.Admin.sys.addClassify','uses'=>'SystemController@addClassify']);
            Route::post('sys/delClassify',['as'=>'Api.Admin.sys.delClassify','uses'=>'SystemController@delClassify']);
            Route::post('goods/setGoods',['as'=>'Api.Admin.goods.setGoods','uses'=>'GoodsController@setGoods']);
            Route::post('goods/delGoods',['as'=>'Api.Admin.goods.delGoods','uses'=>'GoodsController@delGoods']);
            Route::post('goods/setGoodsImg',['as'=>'Api.Admin.goods.setGoodsImg','uses'=>'GoodsController@setGoodsImg']);
            Route::post('goods/delGoodsImg',['as'=>'Api.Admin.goods.delGoodsImg','uses'=>'GoodsController@delGoodsImg']);
            Route::post('goods/setGoodsBanner',['as'=>'Api.Admin.goods.setGoodsBanner','uses'=>'GoodsController@setGoodsBanner']);
            Route::post('goods/delGoodsBanner',['as'=>'Api.Admin.goods.delGoodsBanner','uses'=>'GoodsController@delGoodsBanner']);
            Route::post('goods/delGoodsComment',['as'=>'Api.Admin.goods.delGoodsComment','uses'=>'GoodsController@delGoodsComment']);
            Route::post('goods/delGoodsCommentImg',['as'=>'Api.Admin.goods.delGoodsCommentImg','uses'=>'GoodsController@delGoodsCommentImg']);
            Route::post('goods/setGoodsSpu',['as'=>'Api.Admin.goods.setGoodsSpu','uses'=>'GoodsController@setGoodsSpu']);
            Route::post('goods/delGoodsSpu',['as'=>'Api.Admin.goods.delGoodsSpu','uses'=>'GoodsController@delGoodsSpu']);
            Route::post('order/setGoodsBanner',['as'=>'Api.Admin.order.changeOrderStatus','uses'=>'OrderController@changeOrderStatus']);
            Route::post('order/setShipInfo',['as'=>'Api.Admin.order.setShipInfo','uses'=>'OrderController@setShipInfo']);
            Route::post('sys/setCoupons',['as'=>'Api.Admin.sys.setCoupons','uses'=>'SystemController@setCoupons']);
            Route::post('sys/delCoupons',['as'=>'Api.Admin.sys.delCoupons','uses'=>'SystemController@delCoupons']);
            Route::post('sys/setExpressCompany',['as'=>'Api.Admin.sys.setExpressCompany','uses'=>'SystemController@setExpressCompany']);
            Route::post('sys/delExpressCompany',['as'=>'Api.Admin.sys.delExpressCompany','uses'=>'SystemController@delExpressCompany']);
            Route::post('sys/setExpressUse',['as'=>'Api.Admin.sys.setExpressUse','uses'=>'SystemController@setExpressUse']);
            Route::post('sys/setQrCode',['as'=>'Api.Admin.sys.setQrCode','uses'=>'SystemController@setQrCode']);
            Route::post('sys/delQrCode',['as'=>'Api.Admin.sys.delQrCode','uses'=>'SystemController@delQrCode']);
            Route::post('sys/test',['as'=>'Api.Admin.sys.test','uses'=>'SystemController@test']);
            Route::get('getUserToken',['as'=>'Api.Admin.User.getUserToken','uses'=>'UserController@getUserToken']);
            Route::post('activity/setActivityBargain',['as'=>'Api.Admin.activity.setActivityBargain','uses'=>'ActivityController@setActivityBargain']);
            Route::post('activity/delActivityBargain',['as'=>'Api.Admin.activity.delActivityBargain','uses'=>'ActivityController@delActivityBargain']);

            Route::post('activity/setActivityGroup',['as'=>'Api.Admin.activity.setActivityGroup','uses'=>'ActivityController@setActivityGroup']);
            Route::post('activity/delActivityGroup',['as'=>'Api.Admin.activity.delActivityGroup','uses'=>'ActivityController@delActivityGroup']);


        });

        Route::group(['prefix' => 'wx'],function(){
            Route::any('getJsApiPacket',['as'=>'Api.Wechat.getJsApiPacket','uses'=>'WechatController@getJsApiPacket']);
        });

        Route::group(['prefix' => 'file'],function(){
            Route::post('upload-img',['as'=>'Api.File.upload','uses'=>'ImageController@upload']);
            Route::post('upload-audio',['as'=>'Api.File.uploadAudio','uses'=>'ImageController@uploadAudio']);
            Route::get('show-image/{id}',['as'=>'Api.File.showImageById','uses'=>'ImageController@showImageById']);
            Route::post('uploadBase64Image',['as'=>'Api.File.uploadBase64Image','uses'=>'ImageController@uploadBase64Image']);
            Route::post('upload-user-photo',['as'=>'Api.File.uploadUserPhoto','uses'=>'ImageController@uploadUserPhoto']);
        });

        Route::group(['prefix' => 'auth'],function(){
            Route::post('wxLogin',['as'=>'Api.Auth.wxLogin','uses'=>'AuthController@wxLogin']);
            Route::post('sendVerificationCode',['as'=>'Api.Auth.sendVerificationCode','uses'=>'AuthController@sendVerificationCode']);
            Route::post('bindingPhone',['as'=>'Api.Auth.bindingPhone','uses'=>'AuthController@bindingPhone']);
        });

        Route::group(['prefix' => 'ucenter'],function(){
            Route::get('getUserInfo',['as'=>'Api.UCenter.getUserInfo','uses'=>'UCenterController@getUserInfo']);
            Route::post('newShippingAddress',['as'=>'Api.UCenter.newShippingAddress','uses'=>'UCenterController@newShippingAddress']);
            Route::get('getShippingAddress',['as'=>'Api.UCenter.getShippingAddress','uses'=>'UCenterController@getShippingAddress']);
            Route::post('deleteShippingAddress',['as'=>'Api.UCenter.deleteShippingAddress','uses'=>'UCenterController@deleteShippingAddress']);
            Route::get('getUserIntegralList',['as'=>'Api.UCenter.getUserIntegralList','uses'=>'UCenterController@getUserIntegralList']);
            Route::get('getCouponList',['as'=>'Api.UCenter.getCouponList','uses'=>'UCenterController@getCouponList']);
            Route::post('couponReceive',['as'=>'Api.UCenter.couponReceive','uses'=>'UCenterController@couponReceive']);
            Route::get('getUserCoupon',['as'=>'Api.UCenter.getUserCoupon','uses'=>'UCenterController@getUserCoupon']);
            Route::get('getHomeCoupon',['as'=>'Api.UCenter.getHomeCoupon','uses'=>'UCenterController@getHomeCoupon']);
            Route::get('getCouponDetail',['as'=>'Api.UCenter.getCouponDetail','uses'=>'UCenterController@getCouponDetail']);
            Route::get('scanningIntegral',['as'=>'Api.UCenter.scanningIntegral','uses'=>'UCenterController@scanningIntegral']);

        });

        Route::group(['prefix' => 'goods'],function(){
            Route::get('getGoodsClassify',['as'=>'Api.Goods.getGoodsClassify','uses'=>'GoodsController@getGoodsClassify']);
            Route::get('getGoodsList',['as'=>'Api.Goods.getGoodsList','uses'=>'GoodsController@getGoodsList']);
            Route::get('getGoodsDetails',['as'=>'Api.Goods.getGoodsDetails','uses'=>'GoodsController@getGoodsDetails']);
            Route::post('addShopCart',['as'=>'Api.Goods.addShopCart','uses'=>'GoodsController@addShopCart']);
            Route::get('getShopCart',['as'=>'Api.Goods.getShopCart','uses'=>'GoodsController@getShopCart']);
            Route::post('deleteShopCart',['as'=>'Api.Goods.deleteShopCart','uses'=>'GoodsController@deleteShopCart']);
            Route::post('userComment',['as'=>'Api.Goods.userComment','uses'=>'GoodsController@userComment']);
            Route::get('getUserComment',['as'=>'Api.Goods.getUserComment','uses'=>'GoodsController@getUserComment']);
        });

        Route::group(['prefix' => 'order'],function(){
            Route::post('buildOrder',['as'=>'Api.Order.buildOrder','uses'=>'OrderController@buildOrder']);
            Route::get('getOrders',['as'=>'Api.Order.getOrders','uses'=>'OrderController@getOrders']);
            Route::get('getUserAllOrders',['as'=>'Api.Order.getUserAllOrders','uses'=>'OrderController@getUserAllOrders']);
            Route::post('cancelOrder',['as'=>'Api.Order.cancelOrder','uses'=>'OrderController@cancelOrder']);
            Route::post('useCoupon',['as'=>'Api.Order.useCoupon','uses'=>'OrderController@useCoupon']);
            Route::post('submitOrder',['as'=>'Api.Order.submitOrder','uses'=>'OrderController@submitOrder']);
            Route::post('confirmReceipt',['as'=>'Api.Order.confirmReceipt','uses'=>'OrderController@confirmReceipt']);

        });

        Route::group(['prefix' => 'payment'],function(){
            Route::post('weChatPayment',['as'=>'Api.Payment.weChatPayment','uses'=>'PaymentController@weChatPayment']);
            Route::any('WeChatPayCallback',['as'=>'Api.Payment.WeChatPayCallback','uses'=>'PaymentController@WeChatPayCallback']);
        });

        Route::group(['prefix' => 'refund'],function(){
            Route::get('refund',['as'=>'Api.Refund.refund','uses'=>'RefundController@refund']);
        });

        Route::group(['prefix' => 'other'],function(){
            Route::get('getBannerList',['as'=>'Api.Order.getBannerList','uses'=>'OtherController@getBannerList']);
            Route::get('getExpressCompany',['as'=>'Api.Order.getExpressCompany','uses'=>'OtherController@getExpressCompany']);
            Route::get('getAdvertImg',['as'=>'Api.Order.getAdvertImg','uses'=>'OtherController@getAdvertImg']);
            Route::get('getBannerNavList',['as'=>'Api.Other.getBannerNavList','uses'=>'OtherController@getBannerNavList']);
            Route::get('getData',['as'=>'Api.Other.getData','uses'=>'OtherController@getData']);
            Route::post('excel',['as'=>'Api.Other.excel','uses'=>'OtherController@excel']);
            Route::post('excelData',['as'=>'Api.Other.excelData','uses'=>'OtherController@excelData']);
            Route::get('getGameBannerList',['as'=>'Api.Other.getGameBannerList','uses'=>'OtherController@getGameBannerList']);
        });

        Route::group(['prefix' => 'activity'],function(){
            Route::post('fiberRecord',['as'=>'Api.Activity.fiberRecord','uses'=>'ActivityController@fiberRecord']);
            Route::get('getActivityBargainList',['as'=>'Api.Activity.getActivityBargainList','uses'=>'ActivityController@getActivityBargainList']);
            Route::get('getActivityBargainDetail',['as'=>'Api.Activity.getActivityBargainDetail','uses'=>'ActivityController@getActivityBargainDetail']);
            Route::get('getInitiateBargainDetail',['as'=>'Api.Activity.getInitiateBargainDetail','uses'=>'ActivityController@getInitiateBargainDetail']);
            Route::post('initiateBargain',['as'=>'Api.Activity.initiateBargain','uses'=>'ActivityController@initiateBargain']);
            Route::get('getUserInitiateBargain',['as'=>'Api.Activity.getUserInitiateBargain','uses'=>'ActivityController@getUserInitiateBargain']);
            Route::post('friendBargain',['as'=>'Api.Activity.friendBargain','uses'=>'ActivityController@friendBargain']);
            Route::get('getActivityGroupList',['as'=>'Api.Activity.getActivityGroupList','uses'=>'ActivityController@getActivityGroupList']);
            Route::get('getActivityGroupDetail',['as'=>'Api.Activity.getActivityGroupDetail','uses'=>'ActivityController@getActivityGroupDetail']);
            Route::get('getInitiateGroupList',['as'=>'Api.Activity.getInitiateGroupList','uses'=>'ActivityController@getInitiateGroupList']);
            Route::get('getPayGroupAdd',['as'=>'Api.Activity.getPayGroupAdd','uses'=>'ActivityController@getPayGroupAdd']);
            Route::get('generateShareQrCode',['as'=>'Api.Activity.generateShareQrCode','uses'=>'ActivityController@generateShareQrCode']);

        });

        Route::Group(['prefix'=>'game'],function (){
            Route::post('record',['as'=>'Api.game.record','uses'=>'GameController@record']);
            Route::post('setGameUserInfo',['as'=>'Api.game.setGameUserInfo','uses'=>'GameController@setGameUserInfo']);
            Route::get('getGameUserInfo',['as'=>'Api.game.getGameUserInfo','uses'=>'GameController@getGameUserInfo']);
            Route::post('sendGameVerificationCode',['as'=>'Api.game.sendGameVerificationCode','uses'=>'GameController@sendGameVerificationCode']);
            Route::post('loginGame',['as'=>'Api.game.loginGame','uses'=>'GameController@loginGame']);
            Route::post('loginPhoneGame',['as'=>'Api.game.loginPhoneGame','uses'=>'GameController@loginPhoneGame']);
            Route::post('GameBindingPHone',['as'=>'Api.game.GameBindingPHone','uses'=>'GameController@GameBindingPHone']);
            Route::post('gameBindingPhone',['as'=>'Api.game.gameBindingPhone','uses'=>'GameController@gameBindingPhone']);
            Route::get('getRecord',['as'=>'Api.game.getRecord','uses'=>'GameController@getRecord']);
            Route::get('getRecordLast',['as'=>'Api.game.getRecordLast','uses'=>'GameController@getRecordLast']);
            Route::get('getRanking',['as'=>'Api.game.getRanking','uses'=>'GameController@getRanking']);
            Route::get('startGame',['as'=>'Api.game.startGame','uses'=>'GameController@startGame']);
            Route::post('relive',['as'=>'Api.game.relive','uses'=>'GameController@relive']);
            Route::get('gameTimeCycle',['as'=>'Api.game.gameTimeCycle','uses'=>'GameController@gameTimeCycle']);
            Route::get('appletCode',['as'=>'Api.game.appletCode','uses'=>'GameController@appletCode']);
            Route::get('getInitUrl',['as'=>'Api.game.getInitUrl','uses'=>'GameController@getInitUrl']);
            Route::get('getRanking',['as'=>'Api.game.getRanking','uses'=>'GameController@getRanking']);
            Route::post('setTemplate',['as'=>'Api.game.setTemplate','uses'=>'GameController@setTemplate']);
            Route::post('JudgeIntegral',['as'=>'Api.game.JudgeIntegral','uses'=>'GameController@JudgeIntegral']);
            Route::get('getQrcodeByCode',['as'=>'Api.game.getQrcodeByCode','uses'=>'GameController@getQrcodeByCode']);
            Route::get('getH5QrcodeByCode',['as'=>'Api.game.getH5QrcodeByCode','uses'=>'GameController@getH5QrcodeByCode']);
            Route::get('docQrcode',['as'=>'Api.game.docQrcode','uses'=>'GameController@docQrcode']);
            Route::get('getEverydayScore',['as'=>'Api.game.getEverydayScore','uses'=>'GameController@getEverydayScore']);
            Route::get('getMyYouCoupon',['as'=>'Api.game.getMyYouCoupon','uses'=>'GameController@getMyYouCoupon']);
            Route::post('getMyYouCouponMsg',['as'=>'Api.game.getMyYouCouponMsg','uses'=>'GameController@getMyYouCouponMsg']);
            Route::post('aesTest',['as'=>'Api.game.aesTest','uses'=>'GameController@aesTest']);
            Route::get('rebuildData',['as'=>'Api.game.rebuildData','uses'=>'GameController@rebuildData']);
        });
    });
});
